﻿<%@ Page Title="" Language="C#" MasterPageFile="~/rightContent.Master" AutoEventWireup="true"
    CodeBehind="actualReceivables.aspx.cs" Inherits="WEB.T_bill.actualReceivables" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            height: 311px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="title" runat="server">
    实收销账
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
    <table style="width: 100%;">
        <tr>
            <td align="center">
                <asp:Label ID="sheetID" runat="server" Text="委托单号"></asp:Label>
                <asp:TextBox ID="tbsheetID" runat="server" onkeyup="if(isNaN(value))execCommand('undo')"
                    onafterpaste="if(isNaN(value))execCommand('undo')" MaxLength="5" Enabled="False"></asp:TextBox>
            </td>
            <td align="center">
                <asp:Label ID="clID" runat="server" Text="客户公司"></asp:Label>
                <asp:Label ID="lblcID" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="center" colspan="4" class="style1">
                <asp:GridView ID="gvActualReceivables" runat="server" AutoGenerateColumns="False"
                    OnRowDataBound="gvActualReceivables_RowDataBound" BackColor="White" BorderColor="#DEDFDE"
                    BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Vertical"
                    CssClass="distance" Width="1200px" 
                    ondatabinding="gvActualReceivables_DataBinding">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:TemplateField HeaderText="序号" InsertVisible="False">
                            <ItemStyle HorizontalAlign="Center" />
                            <HeaderStyle HorizontalAlign="Center" Width="5%" />
                            <ItemTemplate>
                                <%#Container.DataItemIndex+1%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="费用类别" ConvertEmptyStringToNull="False" InsertVisible="False">
                            <ItemTemplate>
                                <asp:DropDownList ID="ddlfeeTypeID" runat="server" DataSource='<%#GetFeeType() %>'
                                    DataTextField="feeName" DataValueField="feeTypeNo" SelectedValue='<%# Eval("feeTypeID") %>'
                                    Enabled="False">
                                </asp:DropDownList>
                                <asp:HiddenField ID="billID" runat="server" Value='<%#Eval("billID") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="应收费用金额">
                            <ItemTemplate>
                                <asp:TextBox ID="tbsfeeAmount" runat="server" Style="text-align: right" ReadOnly="true"
                                    Text='<%#Eval("sfeeAmount") %>' MaxLength="13"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="实收费用金额">
                            <ItemTemplate>
                                <asp:TextBox ID="tbafeeAmount" Text='<%#Bind("afeeAmount") %>' Style="text-align: right"
                                    onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')"
                                    runat="server" MaxLength="13"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="结算方式">
                            <ItemTemplate>
                                <asp:DropDownList ID="ddlpayType" runat="server" SelectedValue='<%# Eval("payType") %>'>
                                    <asp:ListItem Value="1">现金</asp:ListItem>
                                    <asp:ListItem Value="2">转账</asp:ListItem>
                                    <asp:ListItem Value="3">支票</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="结算时间">
                            <ItemTemplate>
                                <asp:TextBox ID="tbpayDate" runat="server" class="Wdate" Text='<%#Eval("payDate") %>'
                                    MaxLength="10"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                           <asp:TemplateField HeaderText="收款银行">
                            <ItemTemplate>
                                <asp:TextBox ID="tbBank" 
                                Text='<%#Eval("payBank") %>' runat="server" MaxLength="100"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                         <asp:TemplateField HeaderText="发票">
                            <ItemTemplate>
                                <asp:TextBox ID="tbinvNO" Text='<%#Eval("invNO") %>' runat="server" MaxLength="30"></asp:TextBox>
       
                            </ItemTemplate>
                        </asp:TemplateField>
                          <asp:TemplateField HeaderText="收款人">
                            <ItemTemplate>
                                
                                  <asp:DropDownList ID="ddlempID" DataSource='<%#GetEmpNum() %>' DataTextField="UserName"
                    DataValueField="EMPNum" runat="server" SelectedValue='<%# Eval("empID") %>'  AppendDataBoundItems="True"
                    AutoPostBack="True" 
                >
                <asp:ListItem Value="0   ">——请选择——</asp:ListItem>
                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="备注">
                            <ItemTemplate>
                                <asp:TextBox ID="tbremark" Text='<%#Eval("remark") %>' runat="server" MaxLength="200"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                    <RowStyle BackColor="#F7F7DE" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#FBFBF2" />
                    <SortedAscendingHeaderStyle BackColor="#848384" />
                    <SortedDescendingCellStyle BackColor="#EAEAD3" />
                    <SortedDescendingHeaderStyle BackColor="#575357" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td align="right" style="width: 50%">
                统一结算方式：
                <asp:DropDownList ID="ddlpayType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlpayType_SelectedIndexChanged1">
                    <asp:ListItem Value="1">现金</asp:ListItem>
                    <asp:ListItem Value="2">转账</asp:ListItem>
                    <asp:ListItem Value="3">支票</asp:ListItem>
                </asp:DropDownList>
                &nbsp;收费银行：<asp:TextBox ID="tbpayBank" Text="中国银行珠海九洲港支行" runat="server" 
                    MaxLength="30" AutoPostBack="True" ontextchanged="tbpayBank_TextChanged"></asp:TextBox>
            </td>
            <td>
                统一结算时间：
                <asp:TextBox ID="tbpayDate" runat="server" class="Wdate" Text='<%#Eval("payDate") %>'
                    AutoPostBack="True" OnTextChanged="tbpayDate_TextChanged" MaxLength="10"></asp:TextBox>
                收款人：
                <asp:DropDownList ID="ddlempID" DataSource='<%#GetEmpNum() %>' DataTextField="UserName"
                    DataValueField="EMPNum" runat="server" AutoPostBack="True" 
                    onselectedindexchanged="ddlempID_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td align="center">
                <asp:Label ID="Label1" runat="server" Text="审核人："></asp:Label>
                <asp:DropDownList ID="ddlaudit" runat="server" Enabled="false"
                AppendDataBoundItems="True">
                   <asp:ListItem Value="0">该单未被审核</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td align="center">
                <asp:Label ID="inputEmpNo" runat="server" Text="制单人："></asp:Label>
                <asp:Label ID="lblinputEmpNo" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="center">
                <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" 
                    CssClass="Submit_yellow" />
            </td>
            <td align="center">
                <input id="return" class="Submit_yellowbig" onclick="window.history.go(-1)" 
                    type="button" value="返回" /></td>
        </tr>
    </table>
</asp:Content>
